package com.hmall.feign;

import com.hmall.common.dto.Address;
import com.hmall.common.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("userservice")
public interface FeignClient2 {

    @RequestMapping(value = "/address/{addressId}",method = RequestMethod.GET)
    Address findAddressByAddressId(@PathVariable("addressId") String addressId);

    @GetMapping("/user/{id}")
    User findUserByUserId(@PathVariable("id")Long userId);

    @RequestMapping("user/{totalFee}")
    void updateBalance(@PathVariable("totalFee") Long totalFee);
}
